package appconfig

import (
	"fmt"
	"github.com/spf13/viper"
)

type Mysql struct {
	Host     string
	Port     int
	Username string
	Password string
	Database string
}
type AppConf struct {
	Mysql Mysql
}

var Cond AppConf

func Init() {
	viper.SetConfigFile("appconfig/dev.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&Cond)
	fmt.Println(Cond)
}
